<%@page import="java.util.ArrayList"%>
<%@page import="bean.CompanyPost"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1><a href="CompanyServlet">伯企业</a></h1>
<%
List<CompanyPost> posts=new ArrayList<CompanyPost>();
Object obj=request.getAttribute("postByName");
//序号
int index=1;
if(obj!=null){
	posts=(ArrayList<CompanyPost>)obj;
}
%>
<center>
<%
if(posts.size()==0){
%>
<b>sorry,未找到该职位！</b>
<%
}
else{
%>
<table border="1">
<%
	for(CompanyPost cp:posts){
%>

<tr>
<th colspan="2"><%=index%>诚聘<%=cp.getName() %></th>
</tr>
<tr>
<td>企业名称</td>
<td>企业简介</td>
<td>岗位职责和要求</td>
<td>薪资</td>
<td>工作地点</td>
</tr>
<tr>
<td><%=cp.getCompany().getName()%></td>
<td><%=cp.getCompany().getIntroduce()%></td>
<td><%=cp.getRequire()%></td>
<td><%=cp.getSalary() %>k</td>
<td><%=cp.getWorkingSpace()%></td>
</tr>
<%
index++;
	}
%>
</table>
<%
}
%>
</center>
</body>
</html>